package com.phiture.erp.sale.web.controller.convert;

import com.phiture.erp.sale.api.pojo.resp.ErpSaleOutResp;
import com.phiture.erp.sale.dal.entity.ErpSaleOutDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface ErpSaleOutConvertMapper {
    ErpSaleOutConvertMapper INSTANCE = Mappers.getMapper(ErpSaleOutConvertMapper.class);


    @Mappings({
            @Mapping(target = "saleOutId", source = "id"),
            @Mapping(target = "saleOutNo", source = "no"),
            @Mapping(target = "saleOutStatus", source = "status")
    })
    ErpSaleOutResp toErpSaleOutResp(ErpSaleOutDO saleOutDO);
    List<ErpSaleOutResp> toErpSaleOutRespList(List<ErpSaleOutDO> saleOutDOList);
}
